feat(Logic/Function/Defs): add Function.diag#41082
Conversation
PR summary 331c8c5dcaImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
✅ PR Title Formatted CorrectlyThe title of this PR has been updated to match our commit style conventions. |
Function.diagFunction.diag
| /-- The diagonal map into `Prod`. -/ | ||
| @[inline] protected def diag {α} : α → α × α := Function.prod id id | ||
|
|
||
| @[inherit_doc] notation:max "△(" x:min ")" => Function.diag x |
There was a problem hiding this comment.
have you discussed adding this notation on Zulip?
There was a problem hiding this comment.
There was a discussion in https://leanprover.zulipchat.com/#narrow/channel/144837-PR-reviews/topic/.2337631.3A.20Function.2Eprod.20and.20related.20definitions/with/593475546 - this PR is the result of me separating that larger PR into smaller pieces.
|
See https://leanprover.zulipchat.com/#narrow/channel/144837-PR-reviews/topic/.2341082.2C.20.2341147.2C.20.2341148.20etc.2E.3A.20Function.2Eprod.20and.20friends/with/607343481 for a discussion of this and related PRs. |
Adds a name and notation for the function
fun x => (x, x).